import './assets/main.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

import { createApp } from 'vue'
import App from './App.vue'
import router from '/src/router'
// 引入懒加载指令插件并且注册
import { lazyPlugin } from '@/directives'
import {ref} from "vue";

const app = createApp(App)
const globalVariable = ref('全局变量')
app.provide('globalVariable', globalVariable)

app.use(router)
app.use(lazyPlugin)
app.use(router)
app.mount('#app')
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
